﻿namespace LogisticsTrackingWebApi.Models
{

    /// <summary>
    /// 物流公司信息
    /// </summary>
    public class LogisticsCompany
    {
        /// <summary>
        /// 公司代码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 公司名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 支持的订单号格式描述
        /// </summary>
        public string OrderNumberFormat { get; set; }
    }

    /// <summary>
    /// 物流订单信息
    /// </summary>
    public class LogisticsOrder
    {
        /// <summary>
        /// 订单编号
        /// </summary>
        public string OrderNumber { get; set; }

        /// <summary>
        /// 物流公司代码
        /// </summary>
        public string LogisticsCompanyCode { get; set; }

        /// <summary>
        /// 物流公司名称
        /// </summary>
        public string LogisticsCompanyName { get; set; }

        /// <summary>
        /// 发货人
        /// </summary>
        public string Sender { get; set; }

        /// <summary>
        /// 收件人
        /// </summary>
        public string Receiver { get; set; }

        /// <summary>
        /// 订单状态
        /// </summary>
        public string Status { get; set; }

        /// <summary>
        /// 物流轨迹
        /// </summary>
        public List<LogisticsTrack> Tracks { get; set; } = new List<LogisticsTrack>();

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 预计送达时间
        /// </summary>
        public DateTime? EstimatedDeliveryTime { get; set; }
    }

    /// <summary>
    /// 物流轨迹信息
    /// </summary>
    public class LogisticsTrack
    {
        /// <summary>
        /// 时间点
        /// </summary>
        public DateTime Time { get; set; }

        /// <summary>
        /// 地点
        /// </summary>
        public string Location { get; set; }

        /// <summary>
        /// 状态描述
        /// </summary>
        public string Description { get; set; }
    }
}
